/*
 * Copyright 2012-2014 Manlost.com All right reserved. This software is the confidential and proprietary information of
 * Manlost.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with Manlost.com.
 */
package com.manlost.biz;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.manlost.biz.account.AccountService;
import com.manlost.biz.baby.BabyService;
import com.manlost.biz.common.ManlostServiceFactory;
import com.manlost.biz.tag.BackTagService;
import com.manlost.biz.tag.TagService;

/**
 * 类ManlostServiceLocator.java的实现描述：TODO 类实现描述
 * 
 * @author xiaochuan.luxc 2012-3-25 下午5:27:25
 */
public class ManlostServiceLocator {

    protected final static BeanFactory ctx;

    static {
        String[] ctxs = new String[] { "biz/spring/spring_manlost_service_locator.xml" };
        ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(ctxs);
        ctx = appContext;
    }

    public static AccountService getAccountService() {
        return ctx.getBean(ManlostServiceFactory.class).getAccountService();
    }

    public static BabyService getBabyService() {
        return ctx.getBean(ManlostServiceFactory.class).getBabyService();
    }

    public static TagService getTagService() {
        return ctx.getBean(ManlostServiceFactory.class).getTagService();
    }

    public static BackTagService getBackTagService() {
        return ctx.getBean(ManlostServiceFactory.class).getBackTagService();
    }
}
